package com.tianji.learning.contoller;

import com.tianji.learning.domain.query.PointsBoardQuery;
import com.tianji.learning.domain.vo.PointsBoardVO;
import com.tianji.learning.service.PointsBoardSeasonService;
import com.tianji.learning.service.PointsBoardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequiredArgsConstructor
@RequestMapping("/boards")
@Api(tags = "积分相关接口")
public class PointsBoardController {

    private final PointsBoardService pointsBoardService;

    private final PointsBoardSeasonService seasonService;

    /**
     * 分页查询指定赛季的积分排行榜
     * @param pointsBoardQuery
     * @return
     */
    @GetMapping
    @ApiOperation("分页查询指定赛季的积分排行榜")
    public PointsBoardVO queryPointsBoardBySeason(PointsBoardQuery pointsBoardQuery){
        return pointsBoardService.queryPointsBoardBySeason(pointsBoardQuery);
    }
}